﻿@model trangbaocao.Models.DeviceModel
<div class="container_12">       
    <div class="grid_12">            
        <div class="module">
                <h2 align="right"><span><a href="@Url.Action("Index", "Device")">Quay lại</a></span></h2>                       
                <div class="module-body">
                @using (Html.BeginForm("AddDevice", "Device", FormMethod.Post, new { id = "AddDevice" }))
                {                      
                    <div align="center"><h3>THÊM MỚI THIẾT BỊ</h3>
                        <div class="account" align="center"> <img src="@Url.Content("~/Content/Body/Images/Body_Images/Add_Device.png")" width="12%" /></div>
                        
                    </div>
                    
                    if (TempData["msg"] != null)
                    {                            
                        <p><span class="notification n-error">@TempData["msg"]</span></p>
                    }  
                    <p style="width:25%; float:left"></p>
                    <div style="width:50%; text-align:center; float:left">         
                        <div align="center">
                            <label style="width:55%; text-align:left;">Tên thiết bị:</label>
                                <p align="center" style="padding-left: 10px; width: 100%">
                                    @Html.TextBoxFor(model => model.name, new { @name = "name", @class = "input-medium" }) 
                                    <font color="red">(*)</font>
                                    <label style="width:60%; text-align:left;">
                                    @Html.ValidationMessageFor(model => model.name)
                                    </label>
                                </p>                                                                        
                    </div>                            
                    <div align="center">
                        <label style="width:55%; text-align:left;">Loại thiết bị:</label>
                            <p>
                                @if (Model.loai_tb_id!=null)
                                {
                                    @Html.DropDownListFor(x => x.sort_device_id, Model.loai_tb_id)          
                                }
                            </p>
                    </div> 
                    <p align="center">
                        <label style="width:55%; text-align:left;">Nhà sản xuất:</label>
                        @if (Model.nsx_id!=null)
                        {                                
                            @*@Html.DropDownListFor(x => x.nha_san_xuat_id, Model.nsx_id, "----")*@
                            @Html.DropDownListFor(x => x.manufactorys_id, Model.nsx_id)
                            @*<label>@Html.ValidationMessageFor(model => model.nsx_id)</label>  *@                      
                        }
                    </p>   
                    <p align="center">
                        <label style="width:55%; text-align:left;">Mô tả thiết bị:</label>
                        @Html.TextBoxFor(model => model.mo_ta_thiet_bi, new { @name = "mo_ta_thiet_bi", @class = "input-medium" })
                        <label>@Html.ValidationMessageFor(model => model.mo_ta_thiet_bi)</label>
                    </p>
                    <p align="center">
                        <label style="width:55%; text-align:left;">Ghi chú:</label>
                        @Html.TextBoxFor(model => model.ghi_chu, new { @name = "ghi_chu", @class = "input-medium" })
                        <label>@Html.ValidationMessageFor(model => model.ghi_chu)</label>
                    </p>                    
                    </div>
                     <div class="button" align="center">
                        <p style="width:25%; text-align:center;">
                        <input class="submit-green" type="submit" value="Thêm"/> 
                        <input class="submit-gray" type="reset" value="Hủy" />
                        @*<input class="submit-gray" type="button"  onclick="location.href='@Url.Action("Index", "User")'" value="Quay lại" />*@
                        </p>
                    </div>
                }
                    
                </div> <!-- End .module-body -->

        </div>  <!-- End .module -->
        <div style="clear:both;"></div>
    </div> <!-- End .grid_12 --> 
    <div style="clear:both;"></div>
</div> <!-- End .container_12 -->